const Router = require("koa-router");

const { auth } = require("../middleware/auth.middleware");

const {
  addGoods,
  getGoodsList,
  updateGoods,
  checkGoods,
  removeGoods,
  getGoodsCategory,
} = require("../controller/goods.controller");

const router = new Router({ prefix: "/goods" });

// 创建商品接口
router.post("/createGoods", addGoods);

// 获取商品列表
router.get("/getGoods", getGoodsList);

// 修改商品接口
router.post("/updateGoods", updateGoods);

// 审核商品接口
router.post("/checkGoods", checkGoods);

// 删除商品
router.post("/removeGoods", removeGoods);

// 获取商品分类
router.get("/getGoodsCategory", getGoodsCategory);
module.exports = router;
